<template>
  <div>
    <h1>测试axios二次封装</h1>
  </div>
</template>

<script lang="ts" setup name="App">
  import request from '@/utils/request.ts'
  import { onMounted } from 'vue';
  // 当组件挂载完毕测试发一个请求
  onMounted(()=>{
    request({
      url:'/user/login',
      method:'post',
      data:{
        username:'admin',
        password:'111111'
      }
    }).then(res=>{
      console.log(res)
    })
  })

</script>

<style scoped></style>